from ronglian_sms_sdk import SmsSDK

accId = '8a216da884bbfa150184ec4faa711157'  # 容联云通讯分配的主账号ID
accToken = 'af901e41448649ae9bfa42fe49cde530'  # 容联云通讯分配的主账号TOKEN
appId = '8a216da884bbfa150184ec4fab71115e'  # 容联云通讯分配的应用ID

def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'  # 容联云通讯创建的模板
    mobile = phone  # 手机号
    datas = (code, '5')  # 时间和验证码
    resp = sdk.sendMessage(tid, mobile, datas)
    # print('返回的结果是',resp)
    return resp

